﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIG.DAL.Dapper.Model
{
    /// <summary>
    /// A class which represents the MenuSet table.
    /// </summary>
    [Table("MenuSet")]
    public partial class Menu
    {
        [Key]
        public virtual int Id { get; set; }
        public virtual string Title { get; set; }
        public virtual string Url { get; set; }
        public virtual int Importance { get; set; }
        public virtual bool? Hidden { get; set; }
        public virtual bool Active { get; set; }
        public virtual string Iconfont { get; set; }
        public virtual int? ParentId { get; set; }
        public virtual short? MenuType { get; set; }
        public virtual string Area { get; set; }
        public virtual string Controller { get; set; }
        public virtual string Action { get; set; }
        public virtual int CategoryId { get; set; }
        public virtual DateTime CreatedDate { get; set; }
        public virtual string CreatedBy { get; set; }
        public virtual DateTime? UpdatedDate { get; set; }
        public virtual string UpdatedBy { get; set; }
        public virtual bool IsExpand { get; set; }
        public virtual int? LayoutLevel { get; set; }
        public virtual Menu ParentMenu { get; set; }
        public virtual IEnumerable<Menu> ChildMenus { get; set; }
        public virtual IEnumerable<RoleMenu> RoleMenus { get; set; }
    }

    public enum MenuType : short
    {
        [Display(Name = "页面")]
        PAGE = 1,
        [Display(Name = "操作")]
        ACTION = 2,
        [Display(Name = "无链接")]
        NOLINK = 3,
        [Display(Name = "外链")]
        OUTLINK = 4
    }
}
